/*
 * @Author: your name
 * @Date: 2020-09-18 10:44:28
 * @LastEditTime: 2021-01-17 21:35:46
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \egg-RESTfulAPI\app\model\RoadRealTime.js
 */

module.exports = app => {
  const mongoose = app.mongoose
  const Schema = mongoose.Schema
  const SceneEtcStationModelSchema = new mongoose.Schema({
    stationName1: { type: String, unique: false },
    stationName2: { type: String, unique: false },
    stationType: { type: Number, unique: false },
    lon: { type: Number, unique: false },
    lat: { type: Number, unique: false },
    roadId: { type: Schema.Types.ObjectId, ref: 'BaseSegmentModel' },
    sceneId: { type: Schema.Types.ObjectId, ref: 'Scene' },
  }, { timestamps: { createdAt: 'created', updatedAt: 'updated' }, usePushEach: true })

  return mongoose.model('SceneEtcStationModel', SceneEtcStationModelSchema)
}
